﻿<UserControl x:Class="Signum.Windows.AutoCompleteTextBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Focusable="True" x:Name="me" 
            PreviewMouseDown="userControl_PreviewMouseDown">
             <!--GotMouseCapture="me_GotMouseCapture"
             LostMouseCapture="me_LostMouseCapture">-->
    <StackPanel>
        <TextBox x:Name="txtBox" 
             LostFocus ="txtBox_LostFocus"
             GotFocus="txtBox_GotFocus"
             PreviewKeyDown="txtBox_PreviewKeyDown"
             PreviewKeyUp="txtBox_PreviewKeyUp"/>
        <Popup x:Name="pop" 
               PlacementTarget="{Binding ElementName = txtBox}" 
               Placement="Bottom" 
               Width="{Binding ActualWidth, ElementName=txtBox}"
               PopupAnimation="Fade">
            <ListBox x:Name="lstBox" SelectionMode="Single" SelectionChanged="lstBox_SelectionChanged"/>
        </Popup>
    </StackPanel>
</UserControl>
